<template>
  <div id="Other">
    <v-detail
      :detailData="inputData"
      :inputConfig="inputConfig"
      :rules="rules"
      ref="input"
    ></v-detail>
  </div>
</template>

<script>
import detail from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
  name: "Other",
  mixins: [baseMixin],
  props: {
    inputData: {
      type: Object,
    },
  },
  data() {
    return {
      whseidflag: false,
      rules: {},
    };
  },
  computed: {
    inputConfig() {
      return [
        [
          {
            type: "select",
            label: this.$t("config.caselabeltype"),
            props: "caselabeltype",
            options: this.getOptions("querycodeLkup/CASELABEL"),
            disabled: this.whseidflag,
          },
          {
            type: "textarea",
            label: this.$t("common.note"),
            props: "notes1",
            disabled: this.whseidflag,
          },
        ],
        [
          {
            type: "select",
            label: this.$t("config.cwoflag"),
            props: "cwoflag",
            options: this.getOptions("querycodeLkup/YESNO"),
            disabled: this.whseidflag,
          },
        ],
        [
          {
            type: "input",
            label: "UDF1",
            props: "susr1",
            disabled: this.whseidflag,
          },
          {
            type: "input",
            label: "UDF2",
            props: "susr2",
            disabled: this.whseidflag,
          },
          {
            type: "input",
            label: "UDF3",
            props: "susr3",
            disabled: this.whseidflag,
          },
        ],
        [
          {
            type: "input",
            label: "UDF4",
            props: "susr4",
            disabled: this.whseidflag,
          },
          {
            type: "input",
            label: "UDF5",
            props: "susr5",
            disabled: this.whseidflag,
          },
        ],
      ];
    },
  },
  methods: {},
  mounted() {
    if (this.$store.state.wms.toUpperCase().includes("WMWHSE")) {
      this.whseidflag = true;
    }
  },
  components: {
    "v-detail": detail,
  },
};
</script>

<style scoped></style>
